<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link href="dangdang.css" type="text/css" rel="stylesheet" />
	</head>
	<body>
		<div class="content">
			<div class="logo">
				<span onclick="javascript:window.close()">关闭</span>
			</div>
			<div class="cartList">
				
				<ul>
					<li onclick="shoucang();">移入收藏</li>
					<li onclick="delect();">删除</li>
					<li onclick="shoucang();">移入收藏</li>
					<li onclick="delect();">删除</li>
					<li><span onclick="zongji();">结算</span></li>
				</ul>
				
			</div>
			<div class="shuliang1">
			<span class="jian" onclick="jian1();">-</span>
			<span id="xianshi1">0</span>
			<span class="jia" onclick="jia1();">+</span>
			
			</div>
			<div class="shuliang2">
			<span class="jian" onclick="jian2();">-</span>
			<span id="xianshi2">0</span>
			<span class="jia" onclick="jia2();">+</span>
			
			</div>
			<div id="jiage">￥0.00</div>
		</div>
			<script type="text/javascript">
			var i=0;
			var j=0;
			function close(){
				window.close();
			}
			function jiesuan(){
				var flag1=confirm("您本次购买的商品如下：\n白岩松 "+i+"件 \n岛上书店"+j+"件\n总价:"+(21.90*i+24.10*j)+"元\n请确认以上消息是否有误！！！");
				if(flag1){
					alert("你的订单已提交");
				}else{
					alert("订单提交失败");
				}
			}
			function shoucang(){
				var flag=confirm("移入收藏后，将不再购物车显示，是否继续操作？");
				if(flag){
					alert("移入收藏成功！");
				}else{
					alert("移入收藏失败！");
				}
			}
			function delect(){
				var flag=confirm("你确定要删除商品吗？");
				if(flag){
					alert("删除成功！");
				}else{
					alert("删除失败！");
				}
			}
			function jian1(){
				document.getElementById("xianshi1").innerHTML=--i;
				if(i<=0){
					i=0;
					document.getElementById("xianshi1").innerHTML=i;
					alert("不能再减了，再减就没有了！")
				}
			}
			function jia1(){
				document.getElementById("xianshi1").innerHTML=++i;
			}
			function jian2(){
				document.getElementById("xianshi2").innerHTML=--j;
				if(j<=0){
					j=0;
					document.getElementById("xianshi2 n").innerHTML=j;
					alert("不能再减了，再减就没有了！")
				}
			}
			function jia2(){
				document.getElementById("xianshi2").innerHTML=++j;
			}
			function zongji(){
				document.getElementById("jiage").innerHTML="￥"+(21.90*i+24.10*j).toFixed(2);
				
			}
		</script>
		
	</body>
</html>

